.fab-container {
  position: fixed;
  z-index: 999;
  
  // 水平位置
  &.fab-left {
    left: 20px;
  }
  
  &.fab-right {
    right: 20px;
  }
  
  // 垂直位置
  &.fab-top {
    top: 20px;
  }
  
  &.fab-bottom {
    bottom: 80px;
  }
}

.fab-button {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1001;
  
  &:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
  }
  
  &:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
}

.fab-icon {
  font-size: 48px;
  font-weight: bold;
  color: white;
  transition: transform 0.3s ease;
  
  &.fab-icon-expanded {
    transform: rotate(45deg);
  }
}

.fab-menu {
  position: absolute;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 1); // 操作菜单背景
  border-radius: 50px;

  // 水平展开
  &.fab-menu-horizontal {
    display: flex;
    
    &.fab-menu-left {
      &.fab-menu-top {
        bottom: 0;
        left: 120px;
        flex-direction: row;
      }
      
      &.fab-menu-bottom {
        top: 0;
        left: 120px;
        flex-direction: row;
      }
    }
    
    &.fab-menu-right {
      &.fab-menu-top {
        bottom: 0;
        right: 120px;
        flex-direction: row-reverse;
      }
      
      &.fab-menu-bottom {
        top: 0;
        right: 120px;
        flex-direction: row-reverse;
      }
    }
  }
  
  // 垂直展开
  &.fab-menu-vertical {
    display: flex;
    flex-direction: column;
    
    &.fab-menu-left {
      left: 0;
      
      &.fab-menu-top {
        top: 120px;
        flex-direction: column;
      }
      
      &.fab-menu-bottom {
        bottom: 120px;
        flex-direction: column-reverse;
      }
    }
    
    &.fab-menu-right {
      right: 0;
      
      &.fab-menu-top {
        top: 120px;
        flex-direction: column;
      }
      
      &.fab-menu-bottom {
        bottom: 120px;
        flex-direction: column-reverse;
      }
    }
  }
  
  // 初始状态隐藏
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: all 0.3s ease;
  
  // 展开状态
  &.fab-menu-expanded {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }
}

.fab-menu-item {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  
  &:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
  }
  
  &:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  }
  
  // 延迟动画效果
  &:nth-child(1) {
    transition-delay: 0.05s;
  }
  
  &:nth-child(2) {
    transition-delay: 0.1s;
  }
  
  &:nth-child(3) {
    transition-delay: 0.15s;
  }
  
  &:nth-child(4) {
    transition-delay: 0.2s;
  }
}

.fab-menu-item-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 4px;
}

.fab-menu-item-text {
  font-size: 20px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}